Skip to content

fix: guard worktree audits and Pi agent restoration - #241

Merged
michael-denyer merged 1 commit into
mainfrom
fix-reviewed-bugs
Oct 8, 2026
Merged

michael-denyer merged 1 commit into
mainfrom
fix-reviewed-bugs

Conversation

@michael-denyer

Copy link
Copy Markdown
Owner

Worktree audits could mark a worktree safe when default transcript discovery silently discarded an unreadable runtime directory. Pi session restore could mark an agent stopped before its previous process exited, allowing a second process to resume the same session and working directory.

  • Keep transcript roots when inspection fails for reasons other than absence. The audit reports the scan failure and leaves recent activity unknown, so the worktree requires review.
  • Keep restored agents unavailable until the previous process is confirmed gone. Only identity-matched orphans are signalled; older records without enough identity data refuse continuation while the process remains alive.
  • Add regression coverage for unreadable roots, discovery errors, delayed orphan termination, and legacy records, including successful continuation after exit. Update the Pi tool reference to describe the behavior.

Validation:

  • Repository suite: 1,189 passed, 36 skipped.
  • Orchestration and watch-PR suites: 225 passed.
  • Signed-in Pi integration suite using real processes and model calls: 11 passed.
  • Pi and script TypeScript checks, script formatting, generated-file checks, and diff checks passed.

The queued-PR cancellation fix found during the same review is already merged in #239 and is part of this PR's base.

@michael-denyer
michael-denyer merged commit e6719ac into main Oct 8, 2026
14 checks passed
@michael-denyer
michael-denyer deleted the fix-reviewed-bugs branch October 8, 2026 21:38
@michael-denyer michael-denyer mentioned this pull request Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant